package ch.lom.clemens.android.bibliography.data;

import java.util.ArrayList;
import java.util.Collection;

public class MGroup extends MCollection {

	public MGroup(MendeleyConnector con) {
		super(con);
	}

	public Collection<MDocument> getDocuments() {
		
		Collection<MDocument> docs = new ArrayList<MDocument>();
		
		String [] docids =  m_con.getGroupDocumentIDs(this);
		
		if (docids == null) return null;
		
		for (String id : docids) {
			docs.add(new MDocument(this, id));
		}
		
		return docs;
	}

	public void getDocument(MDocument doc) {
		m_con.fillGroupDocument(this,doc);
	}
	
	
}

